package com.cleargroup.magic.cleara

import android.os.Bundle
import android.view.View
import com.aa.base.BaseActivity
import com.aa.base.PlayerCheck
import com.helpudashi.ccniu.databinding.ActivitySettingBinding

/**
 * @author Afra55
 * @date 8/16/21
 * A smile is the best business card.
 */
class SettingActivity : BaseActivity<ActivitySettingBinding>() {
    override fun initBinding(): ActivitySettingBinding {
        return ActivitySettingBinding.inflate(layoutInflater)
    }

    override fun initLogic(savedInstanceState: Bundle?) {
        binding.privacy.setOnClickListener {
            WebviewActivity.start(this, "隐私条款", StaticUrl.getPrivacyUrl())
        }
        binding.terms.setOnClickListener {
            WebviewActivity.start(this, "用户服务协议", StaticUrl.getTermsOfUsUrl())
        }

        if (PlayerCheck.isNoLimit()) {
            binding.privacy.visibility = View.GONE
            binding.terms.visibility = View.GONE
        }
    }
}